<template>
    <div class="supervisors-list">
        <div class="poup-box">
            <div class="close" @click="store.changeShowOn"></div>
            <div class="title setColor">在职监督员列表</div>
            <div class="xiaiaobox">
                <img class="xiabiao" src="../../assets/namexiabiao.png" alt="">
            </div>
            <div class="check-box">
                <div class="left">
                    <!-- 姓名 -->
                    <input type="text" class="input" placeholder="请输入监督员姓名" />
                    <!-- 性别 -->
                    <el-dropdown>
                        <el-button class="sexbox">请选择性别
                        <el-icon class="el-icon--right">
                            <arrow-down />
                        </el-icon>
                        </el-button>
                        <template #dropdown>
                            <el-dropdown-menu>
                                <el-dropdown-item>Action 1</el-dropdown-item>
                                <el-dropdown-item>Action 2</el-dropdown-item>
                                <el-dropdown-item>Action 3</el-dropdown-item>
                                <el-dropdown-item>Action 4</el-dropdown-item>
                                <el-dropdown-item>Action 5</el-dropdown-item>
                            </el-dropdown-menu>
                        </template>
                    </el-dropdown>
                    <!-- 年龄段 -->
                    <el-dropdown>
                        <el-button class="sexbox">年龄段
                        <el-icon class="el-icon--right">
                            <arrow-down />
                        </el-icon>
                        </el-button>
                        <template #dropdown>
                            <el-dropdown-menu>
                                <el-dropdown-item>Action 1</el-dropdown-item>
                                <el-dropdown-item>Action 2</el-dropdown-item>
                                <el-dropdown-item>Action 3</el-dropdown-item>
                                <el-dropdown-item>Action 4</el-dropdown-item>
                                <el-dropdown-item>Action 5</el-dropdown-item>
                            </el-dropdown-menu>
                        </template>
                    </el-dropdown>
                </div>
                <div class="right">
                    <!-- 搜索 -->
                    <button class="setColor1"></button>
                    <!-- 重置 -->
                    <button class="setColor2"></button>
                </div>
            </div>
            <div class="titlebox">
                <div class="item" v-for="(item,index) in titleList" :key="index">{{ item }}</div>
            </div>
            <div class="conlist">
                <div class="item" v-for="(item,index) in list" :key="index">
                    <div class="text">{{ item.name }}</div>
                    <div class="text">{{ item.sex }}</div>
                    <div class="text">{{ item.age }}</div>
                    <div class="text">{{ item.time }}</div>
                    <div class="text">{{ item.num }}</div>
                    <div class="text">{{ item.count }}</div>
                    <div class="text">{{ item.ping }}</div>
                    <div class="text">{{ item.set }}</div>
                </div>
            </div>
            <div class="superpagenumber">
                <span class="span">共{{ total }}条数据</span>
                <el-pagination class="my-page"
                v-model:page-size="pageSize3"
                :background="background"
                layout="prev, pager, next, jumper"
                :total="total"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                />
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { ArrowDown } from '@element-plus/icons-vue'
import { ref } from 'vue';

let titleList = ref(['监督员', '性别', '年龄', '选任时间', '累计培训次数', '监督案件数量', '综合评价','操作'])
let list = ref([
    {name:'张海波',sex:'男',age:'38',time:'2024-02-01',num:'33',count:'20',ping:'9.9',set:'查看'},
    {name:'王家胜',sex:'男',age:'27',time:'2024-02-01',num:'30',count:'18',ping:'9.9',set:'查看'},
    {name:'李力',sex:'男',age:'44',time:'2024-02-01',num:'21',count:'18',ping:'9.9',set:'查看'},
    {name:'陈思',sex:'女',age:'31',time:'2024-02-01',num:'5',count:'18',ping:'9.9',set:'查看'},
    {name:'张全',sex:'男',age:'25',time:'2024-01-01',num:'4',count:'16',ping:'9.9',set:'查看'},
    {name:'赵敏',sex:'女',age:'26',time:'2024-01-01',num:'3',count:'15',ping:'9.9',set:'查看'},
    {name:'陈泽',sex:'男',age:'31',time:'2024-01-01',num:'1',count:'15',ping:'9.9',set:'查看'},
    {name:'宰琳',sex:'男',age:'30',time:'2024-01-01',num:'21',count:'12',ping:'9.9',set:'查看'},
    {name:'鄂泰枫',sex:'男',age:'45',time:'2024-01-01',num:'36',count:'21',ping:'9.9',set:'查看'},
    {name:'甘寒秋',sex:'男',age:'27',time:'2024-01-01',num:'15',count:'11',ping:'9.9',set:'查看'},
])
const pageSize3 = ref(10)
const background = ref(true)
let total = ref(600)
const handleSizeChange = (val: number) => {
  console.log(`${val} items per page`)
}
const handleCurrentChange = (val: any) => {
  console.log(`current page: ${val}`)
}

import { useCounterStore } from '@/stores/poups'
const store = useCounterStore()
</script>

<style lang="less" scoped>
.supervisors-list {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .7);
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    .poup-box {
        width: 1407px;
        height: 860px;
        background-image: url("../../assets/poupbg.png");
        background-size: 100% 100%;
        position: relative;
        box-sizing: border-box;
        padding: 0 48px;

        .close {
            width: 32px;
            height: 32px;
            background-image: url("../../assets/icon_flowpages_close.png");
            background-size: 100% 100%;
            position: absolute;
            right: 50px;
            top: 56px;
            cursor: pointer;
        }

        .title {
            width: 100%;
            margin-top: 64px;
            text-align: center;
            font-family: AlimamaShuHeiTi-Bold;
            font-weight: 700;
            font-size: 32px;
        }

        .xiaiaobox {
            width: 100%;
            display: flex;
            justify-content: center;
            margin-top: 10px;

            .xiabiao {
                width: 234px;
                height: 2px;
            }
        }

        .check-box {
            width: 100%;
            margin-top: 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;

            .left {
                display: flex;
                align-items: center;

                .input {
                    width: 164px;
                    height: 32px;
                    border: none;
                    margin: 0;
                    background: none;
                    background-image: url("../../assets/poup-check-bg.png");
                    background-size: 100% 100%;
                    box-sizing: border-box;
                    padding: 0 8px;
                    font-size: 14px;
                    margin-right: 16px;
                }
                .sexbox{
                    width: 164px;
                    height: 32px;
                    border: none;
                    margin: 0;
                    background: none;
                    background-image: url("../../assets/poup-check-bg.png");
                    background-size: 100% 100%;
                    box-sizing: border-box;
                    padding: 0 8px;
                    font-size: 14px;
                    margin-right: 16px;
                }
            }
            .right{
                display: flex;
                align-items: center;
                .setColor1{
                    width: 86px;
                    height: 32px;
                    border: none;
                    background: none;
                    background-image: url("../../assets/searchbtn.png");
                    background-size: 100% 100%;
                    cursor: pointer;
                }
                .setColor2{
                    width: 86px;
                    height: 32px;
                    border: none;
                    background: none;
                    background-image: url("../../assets/resbtn.png");
                    background-size: 100% 100%;
                    cursor: pointer;
                    margin-left: 12px;
                }
            }
        }
        .titlebox{
            width: 100%;
            height: 38px;
            background: rgba(0, 88, 255, 0.5);
            margin-top: 16px;
            display: flex;
            align-items: center;
            box-sizing: border-box;
            padding: 0 21px;
            .item{
                width: calc(100%/8);
                font-size: 14px;
                color: rgba(255, 255, 255, 0.85);
            }
        }
        .conlist{
            width: 100%;
            height: 480px;
            .item{
                width: 100%;
                margin-top: 16px;
                height: 32px;
                background-image: url("../../assets/bg_text.png");
                background-size: 100% 100%;
                display: flex;
                align-items: center;
                box-sizing: border-box;
                padding: 0 21px;
                .text{
                    width: calc(100%/8);
                    font-size: 14px;
                    color: #FFFFFF;
                }
            }
        }
        .superpagenumber{
            width: 100%;
            display: flex;
            justify-content: center;
            margin-top: 36px;
            .span{
                color: #ffffffd9;
                font-size: 14px;
                line-height: 40px;margin-right: 20px;
            }
            .my-page :deep(.el-pagination__jump) {
                color: white; /* 修改跳转输入框文字颜色 */
            }
            .my-page :deep(.el-input__wrapper) {
                border: 1px solid #0940aacc;
                background: none;
            }
            .my-page :deep(.el-input__inner) {
                color: white;
            }
            .my-page :deep(.more), .my-page :deep(.btn-next), .my-page :deep(.btn-prev), .my-page :deep(.number) {
                color: white;
                border: 1px solid #0940aacc;
                background: none;
            }
            .my-page :deep(.is-active) {
                background-color: var(--el-color-primary);
                color: var(--el-color-white);
            }
        }
    }
}
</style>